package test.spring.aop.bean;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class SleepHelpe {

    public SleepHelpe(){
        
    }
    
   // @Pointcut("execution(* test.spring.aop.bean.Human.*(..))")
    @Pointcut("execution(* com.web.jdbcbase.service.impl.MenuServiceImpl.*(..))")
    public void allMethod(){}
    
    @Before("allMethod()")
    public void beforeSleep(){
        System.out.println("SleepHelpe睡觉前要脱衣服!");
    }
    
    @AfterReturning("allMethod()")
    public void afterSleep(){
        System.out.println("SleepHelpe睡醒了要穿衣服！");
    }
}
